cmake_minimum_required(VERSION 2.8)
project(trslam)

#####################################
## 自定义变量
#set(COMPILE  aarch64-linux-gnu-) # 编译器
#set(PLATFORM_DIR ambarella)
#set(AMBA_SDK ambarella/${PLATFORM})
#
#
##set(CMAKE_SYSTEM_NAME  linux)
#set(CMAKE_C_COMPILER   ${COMPILE}gcc)
#set(CMAKE_CXX_COMPILER ${COMPILE}g++)
#set(CMAKE_C_FLAGS      "${CMAKE_CXX_FLAGS} -std=c99 -g -DIA_PLATFORM_AMBA_CV22 -ldl -lpthread -rdynamic")
#set(CMAKE_CXX_FLAGS    "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive -g -DIA_PLATFORM_AMBA_CV22 -DITS_PRODUCT -ldl -lpthread -rdynamic")
#####################################



set(CMAKE_BUILD_TYPE Debug)

set(CMAKE_C_FLAGS   "-std=c++11 -Wall  -ldl -lpthread -rdynamic")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall  -ldl -lpthread -rdynamic")

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

############### dependencies ######################
enable_testing()




############################################
## Ambarella SDK 头文件、库文件搜索路径
#include_directories(/usr/local/${AMBA_SDK}/include
#                    /usr/local/${AMBA_SDK}/include/cavalry/)
#link_directories(/usr/local/${AMBA_SDK}/lib)
############################################
set(THIRD_PARTY_LIBS
        dl pthread
        )



############### source and test ######################
include_directories(${PROJECT_SOURCE_DIR}/include)

add_subdirectory(src)   # 编译库
add_subdirectory(test)  # 编译测试
#add_subdirectory(app)   # 编译app







